<?php

namespace App\Models\CarModels;

use App\Models\SystemManagement\Employee;
use Illuminate\Database\Eloquent\Model;

class CarFuelRecord extends Model
{
    //
    protected $table = 'car_fuel_records';
    protected $fillable = ['amount','price','total','mileage','time','record_time',
        'address','desc','car_id','staff_id'];
    public function cars(){
        return $this->belongsTo(CarInfo::class,'car_id','id')->with('kind');
    }
    public function car(){
        return $this->belongsTo(CarInfo::class,'car_id','id')->with('kind');
    }

    public function staff(){
        return $this->belongsTo(Employee::class,'staff_id','id');
    }
}
